<template>
  <div class="tool-form-item">
    <label class="tool-form-item_label" :style="{ 'width': labelWitdh }">{{label}}</label>
    <div class="tool-form-item_content" :style="{ 'margin-left': labelWitdh }">
      <slot></slot>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    // 文本内容
    label: {
      type: String,
      default: ''
    },
    // 文本宽度
    labelWitdh: {
      type: String,
      default: '120px'
    }
  }
}
</script>

<style>
.tool-form-item{
  margin-bottom: 16px;
}
.tool-form-item::after{
  clear: both;
}
.tool-form-item_label{
  float: left;
  padding-right: 10px;
  color: #636363;
  text-align: right;
  font-size: 12px;
  line-height: 35px;
  vertical-align: center;
  box-sizing: border-box;
}
.tool-form-item_content{
  line-height: 30px;
  position: relative;
  font-size: 12px;
}
.tool-form-item_content .tool-input{
  max-width: 300px;
}
.tool-form-item_content .tool-select{
  max-width: 300px;
}
</style>